package com.joinway.mobile.bean.jsondoc

import org.restapidoc.annotation.RestApiObjectField
import org.restapidoc.annotation.RestApiObjectFields

class CustomResponseDoc {

	@RestApiObjectField(description = "通用请求结果")
	@RestApiObjectFields(params=[
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.CODE_FIELD_NAME,
			description = JsonDocConstants.CODE_FIELD_DESC,
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.MESSAGE_FIELD_NAME,
			description = JsonDocConstants.MESSAGE_FIELD_DESC,
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.ERROR_FIELD_NAME,
			description = JsonDocConstants.ERROR_FIELD_NAME,
			useForCreation = false)
	])
	static def View

		@RestApiObjectField(description = "用户登录结果")
	@RestApiObjectFields(params=[
		@RestApiObjectField(
			apiFieldName = "userId",
			description = "用户id",
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.CODE_FIELD_NAME,
			description = JsonDocConstants.CODE_FIELD_DESC,
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.MESSAGE_FIELD_NAME,
			description = JsonDocConstants.MESSAGE_FIELD_DESC,
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.ERROR_FIELD_NAME,
			description = JsonDocConstants.ERROR_FIELD_NAME,
			useForCreation = false)
	])
	static def LoginView
	
	@RestApiObjectField(description = "查询客户端最新版本信息")
	@RestApiObjectFields(params=[
		@RestApiObjectField(
			apiFieldName = "version",
			description = "最新程序的版本",
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = "url",
			description = "下载地址",
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.CODE_FIELD_NAME,
			description = JsonDocConstants.CODE_FIELD_DESC,
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.MESSAGE_FIELD_NAME,
			description = JsonDocConstants.MESSAGE_FIELD_DESC,
			useForCreation = false),
		@RestApiObjectField(
			apiFieldName = JsonDocConstants.ERROR_FIELD_NAME,
			description = JsonDocConstants.ERROR_FIELD_NAME,
			useForCreation = false)
	])
	static def VersionView

}
